<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let wm = new WeakMap();
        let obj = {
            name:'mikaisa'
        }
        // WeakMap的set方法有些奇特，要求key是object类型，value是any也就是任意类型
        wm.set(obj,'123');
        obj = null;
        console.log(wm);

        
    </script>
</body>
</html>